package com.example.demo;

import lombok.extern.slf4j.Slf4j;
import org.noear.solon.core.handle.Action;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.FilterChain;

/**
 * @author airhead
 */
@Slf4j
public class ViewPathFilter extends BaseFilter {
  @Override
  protected boolean isClear(Action action) {
    return false;
  }

  @Override
  public void doFilter(Context ctx, Action action, FilterChain chain) throws Throwable {
    if (action != null) {
      log.info("do something, action");
    } else {
      log.info("do nothing");
    }

    chain.doFilter(ctx);
  }
}
